Socket
Socket
Sign inDemoInstall

fixturify-project

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fixturify-project

[![Build Status](https://travis-ci.org/stefanpenner/node-fixturify-project.svg?branch=master)](https://travis-ci.org/stefanpenner/node-fixturify-project) [![Build status](https://ci.appveyor.com/api/projects/status/li9y4rjfjt7fmvpc/branch/master?svg=true)


Version published
Weekly downloads
306K
decreased by-22.71%
Maintainers
2
Weekly downloads
 
Created

What is fixturify-project?

The fixturify-project npm package is a utility for creating and managing file system fixtures in a programmatic way. It is particularly useful for testing and development purposes, allowing you to easily set up and tear down file system states.

What are fixturify-project's main functionalities?

Creating a new project

This feature allows you to create a new project with a specified structure. In this example, a new project named 'my-app' is created with a single file 'index.js' containing a simple console log statement.

const { Project } = require('fixturify-project');
const project = new Project('my-app', {
  files: {
    'index.js': 'console.log("Hello, world!");'
  }
});
project.writeSync();

Adding files to an existing project

This feature allows you to add new files to an existing project. In this example, a new file 'new-file.js' is added to the 'my-app' project with a console log statement.

const { Project } = require('fixturify-project');
const project = new Project('my-app');
project.files['new-file.js'] = 'console.log("New file");';
project.writeSync();

Reading project files

This feature allows you to read the files of an existing project. In this example, the files of the 'my-app' project are read and logged to the console.

const { Project } = require('fixturify-project');
const project = new Project('my-app');
project.readSync();
console.log(project.files);

Deleting files from a project

This feature allows you to delete files from an existing project. In this example, the 'index.js' file is deleted from the 'my-app' project.

const { Project } = require('fixturify-project');
const project = new Project('my-app');
delete project.files['index.js'];
project.writeSync();

Other packages similar to fixturify-project

FAQs

Package last updated on 16 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc